package com.fy56.platform.logistics.service.impl.common;

import com.fy56.platform.logistics.redis.dao.IRedisDao;
import com.fy56.platform.logistics.service.common.IRedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Redis service层基础
 * Created by li on 2018-02-05 13:54
 */
@Service
public class CommonRedisServiceImpl implements IRedisService {

    @Autowired
    private IRedisDao redisDao;

    @Override
    public Object get(String key){
        return redisDao.get(key);
    }

    @Override
    public void set(String key, String val){ redisDao.set(key, val); }

    @Override
    public void delete(String key){
        redisDao.delete(key);
    }

    @Override
    public void set(String key, String val, int overTime) { redisDao.set(key, val, overTime); }

    @Override
    public void expire(String key, int overTime) {
        redisDao.expire(key, overTime);
    }

    @Override
    public boolean hasKey(String key) {
        return redisDao.hasKey(key);
    }

}
